# Node server
FROM node:16.13.2-alpine as node-server
WORKDIR /usr/src/app
COPY ["package.json", "./"]
RUN npm install --production --silent && mv node_modules ../
COPY server.js .

#使用非root用户
USER node
EXPOSE 4000
# CMD ["node", "server.js"]
CMD ["npm", "start"]
